06. Create an ndarray
Start Quiz:
import numpy as np
# Using the Built-in functions you learned about in the
# previous lesson, create a 4 x 4 ndarray that only
# contains consecutive even numbers from 2 to 32 (inclusive)
X =
import numpy as np
X = np.arange(2,34,2).reshape(4,4)
INSTRUCTOR NOTE:
Try creating the same array using the np.linspace()
function. The answer is below:
np.linspace(2,32,16).reshape(4,4)